6.5 Partition Functions and Free Energy